package cn.offcn.service;

import cn.offcn.entity.Employee;
import cn.offcn.entity.EmployeeVo;
import cn.offcn.utils.OAResult;
import cn.offcn.utils.TableVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.util.Map;

/**
 * @author yuliantao
 * @create 2020 -09 -2020-09-21 21:52
 * @description 功能描述
 */
public interface EmployeeService {

    /**
     * 功能描述: <br>
     * 〈查询所有员工和部门〉
     * @Param: []
     * @Return: java.util.Map<java.lang.String,java.lang.Object>
     * @Author: Dong
     * @Date: 2020-09-21 22:59
     */
    public Map<String,Object> getAllDeptAndRole();

/**
 * 功能描述: <br>
 * 〈保存员工〉
 * @Param: [employee, roleid, uploadPic]
 * @Return: cn.offcn.utils.OAResult
 * @Author: Dong
 * @Date: 2020-09-21 23:09
 */
    public OAResult addEmployee(Employee employee, int roleid, MultipartFile uploadPic);
/**
 * 功能描述: <br>
 * 〈分页查询〉
 * @Param: [page, limit]
 * @Return: cn.offcn.utils.TableVo<cn.offcn.entity.EmployeeVo>
 * @Author: Dong
 * @Date: 2020-09-21 23:09
 * @return
 */
    public TableVo<EmployeeVo> getEmployeesInfo(int page, int limit);
/**
 * 功能描述: <br>
 * 〈根据Id查询角色信息〉
 * @Param: [eid]
 * @Return: cn.offcn.utils.TableVo<cn.offcn.entity.EmployeeVo>
 * @Author: Dong
 * @Date: 2020-09-23 22:02
 */
   public Map<String,Object> getEmployeeByEid(int eid);
   /**
    * 功能描述: <br>
    * 〈更新操作〉
    * @Param: [employee, roleid, uploadPic]
    * @Return: cn.offcn.utils.OAResult
    * @Author: Dong
    * @Date: 2020-09-23 23:10
    */
    public OAResult  updateEmployeeByEid(Employee employee,int roleid,MultipartFile uploadPic);

    /**
     * 功能描述: <br>
     * 〈删除·1〉
     * @Param: [eids]
     * @Return: cn.offcn.utils.OAResult
     * @Author: Dong
     * @Date: 2020-09-24 15:58
     */
   public OAResult deleteEmployeeByEids(int[] eids);
/**
 * 功能描述: <br>
 * 〈登陆〉
 * @Param: [username, password, session]
 * @Return: cn.offcn.utils.OAResult
 * @Author: Dong
 * @Date: 2020-09-24 19:23
 */
    public OAResult  checkLogin(String username, String password);
}
